#pragma once
#include "URFImpl.h"

using Poco::FileInputStream;

class URFReaderImpl :public URFImpl
{
public:
	URFReaderImpl(void);
	~URFReaderImpl(void);
	virtual int open(const string& path);
	virtual int read(Int64 utcTime,char** ppFrame);
	virtual int read(char** ppChunk);
	virtual int close();
private:
	int readHeader();
	int readIdxTable();
	int readChunkItem();
	int readSyncTable();
private:
	FileInputStream m_fs;
	FileHeader	m_fHeader;
	IndexTable  m_idxTable;
	char* m_pChunkBuffer;

};

